package utils;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

/**
 * Created by honghao on 2017/2/4.
 */
public class DbUtil {
    private static SessionFactory sf;

    public static SessionFactory getSf() {
        Configuration cf = new Configuration();
        cf.configure();
        sf = cf.buildSessionFactory();
        return sf;
    }

}
